<%@ page pageEncoding='UTF-8' contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/common/header.jsp"%>

<table cellspacing="2" cellpadding="2" border="1" width="100%" bordercolor="black">
    <c:forEach items="${requestScope.entityList}" var="customer">
        <tr>
            <td>${customer.id}</td>
            <td>${customer.name}</td>
            <td>${customer.nickName}</td>
            <td>
                <a href="${pageContext.request.contextPath}/cc/rental/list?customer_id=${customer.id}">Rentals</a>
            </td>
            <td>
                <%--method="delete"  как-то не работает :(   хотя curl-ом дергается --%>
                <form action="${pageContext.request.contextPath}/cc/customer/list" accept-charset="UTF-8" method="post">
                    <input type="hidden" name="isDelete" value="true">
                    <input type="hidden" name="id" value="${customer.id}">
                    <input type="submit" value="Удалить"/>
                </form>
            </td>
        </tr>
    </c:forEach>
</table>
<br>
<a href="${pageContext.request.contextPath}/cc/customer/add">Добавить пользователя</a>
<br>
<%@include file="/WEB-INF/common/footer.jsp"%>